<template>
	<component :is = "comName" @change = "changeCom" :title = "title"></component>
</template>

<script>
import topHeader from './components/header' 
import search from './components/search'
export default {
	name : 'topBar',
	props : ["title"],
	data () {
		return {
			comName : 'topHeader',
		}
	},
	components : {
		topHeader,
		search
	},
	methods : {
		changeCom (conName) {
			this.comName = conName;
		}
	},
}
</script>

<style lang = "less" scoped>
	
</style>